<!DOCTYPE html>
<html style="height: 100%">
   <head>
       <meta charset="utf-8">
       <meta http-equiv='X-UA-Compatible' content='IE=edge'>
        <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
       <title>全国地级市新冠肺炎疫情热力图</title> 
       <script>
        var _hmt = _hmt || [];
        (function() {
          var hm = document.createElement("script");
          hm.src = "https://hm.baidu.com/hm.js?c94964d386a4205ea05ef308c7feeb4a";
          var s = document.getElementsByTagName("script")[0]; 
          s.parentNode.insertBefore(hm, s);
        })();
        </script>      
   </head>
   <body style="height: 100%; margin: 0">
       <div id="container" style="height: 100%"></div>
       <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts/dist/echarts.min.js"></script>
       <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts-gl/dist/echarts-gl.min.js"></script>
       <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts-stat/dist/ecStat.min.js"></script>
       <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts/dist/extension/dataTool.min.js"></script>
       <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts/map/js/china.js"></script>
       <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts/map/js/world.js"></script>
       <script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=61fa03749e0a51515655830a1dedd290&__ec_v__=20190126"></script>
       <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts/dist/extension/bmap.min.js"></script>
       <script type="text/javascript" src="./confirmed_datas.js"></script>
       <script type="text/javascript" src="https://www.echartsjs.com/examples/vendors/jquery/jquery.js"></script>
       <script src="https://cdn.bootcss.com/jquery-csv/1.0.5/jquery.csv.min.js"></script>
       <script type="text/javascript">
 
 var geoCoordMap = {
  "北京市": [116.405285,39.904989],
  "西城区":[116.366794,39.915309],
  "朝阳区":[116.486409,39.921489],
  "丰台区":[116.286968,39.863642],
  "石景山区":[116.195445,39.914601],
  "海淀区":[116.310316,39.956074],
  "门头沟区":[116.105381,39.937183],
  "房山区":[116.139157,39.735535],
  "通州区":[116.658603,39.902486],
  "顺义区":[116.653525,40.128936],
  "昌平区":[116.235906,40.218085],
  "大兴区":[116.338033,39.728908],
  "怀柔区":[116.637122,40.324272],
  "平谷区":[117.112335,40.144783],
  "密云区":[116.843352,40.377362],
  "延庆区":[115.985006,40.465325],
  "和平区":[117.195907,39.118327],
  "河东区":[117.226568,39.122125],
  "河西区":[117.217536,39.101897],
  "南开区":[117.164143,39.120474],
  "河北区":[117.201569,39.156632],
  "红桥区":[117.163301,39.175066],
  "东丽区":[117.313967,39.087764],
  "西青区":[117.012247,39.139446],
  "津南区":[117.382549,38.989577],
  "北辰区":[117.13482,39.225555],
  "武清区":[117.057959,39.376925],
  "宝坻区":[117.308094,39.716965],
  "滨海新区":[117.654173,39.032846],
  "宁河区":[117.82828,39.328886],
  "静海区":[116.925304,38.935671],
  "蓟州区":[117.407449,40.045342],
  "秦皇岛市": [119.604368,39.945462],
  "唐山市": [118.183451,39.650531],
  "天津市": [117.190182,39.125596],
  "邯郸市": [114.482694,36.609308],
  "石家庄市": [
    114.522082,
    38.048958
  ],
  "邢台市": [
    114.520487,
    37.069531
  ],
  "保定市": [
    115.49481,
    38.886565
  ],
  "张家口市": [
    114.893782,
    40.811188
  ],
  "沧州市": [
    116.863806,
    38.297615
  ],
  "廊坊市": [
    116.703602,
    39.518611
  ],
  "衡水市": [
    115.686229,
    37.746929
  ],
  "长治市": [
    113.120292,
    36.201664
  ],
  "太原市": [
    112.550864,
    37.890277
  ],
  "阳泉市": [
    113.569238,
    37.869529
  ],
  "晋城市": [
    112.867333,
    35.499834
  ],
  "朔州市": [
    112.479928,
    39.337672
  ],
  "晋中市": [
    112.738514,
    37.693362
  ],
  "运城市": [
    111.006854,
    35.038859
  ],
  "临汾市": [
    111.538788,
    36.099745
  ],
  "忻州市": [
    112.727939,
    38.461031
  ],
  "吕梁市": [
    111.143157,
    37.527316
  ],
  "呼和浩特市": [
    111.660351,
    40.828319
  ],
  "包头市": [
    109.846239,
    40.647119
  ],
  "乌海市": [
    106.831999,
    39.683177
  ],
  "通辽市": [
    122.260363,
    43.633756
  ],
  "赤峰市": [
    118.930761,
    42.297112
  ],
  "呼伦贝尔": [
    119.760822,
    49.201636
  ],
  "鄂尔多斯": [
    109.993706,
    39.81649
  ],
  "巴彦淖尔": [
    107.423807,
    40.76918
  ],
  "兴安盟": [
    122.048167,
    46.083757
  ],
  "乌兰察布": [
    113.112846,
    41.022363
  ],
  "沈阳市": [
    123.432791,
    41.808645
  ],
  "锡林郭勒盟": [
    116.02734,
    43.939705
  ],
  "阿拉善盟": [
    105.695683,
    38.843075
  ],
  "本溪市": [
    123.778062,
    41.325838
  ],
  "丹东市": [
    124.338543,
    40.129023
  ],
  "抚顺市": [
    123.92982,
    41.877304
  ],
  "大连市": [
    121.593478,
    38.94871
  ],
  "锦州市": [
    121.147749,
    41.130879
  ],
  "盘锦市": [
    122.073228,
    41.141248
  ],
  "营口市": [
    122.233391,
    40.668651
  ],
  "阜新市": [
    121.660822,
    42.01925
  ],
  "辽阳市": [
    123.172451,
    41.273339
  ],
  "鞍山市": [
    123.007763,
    41.118744
  ],
  "朝阳市": [120.451176,41.576758],
  "葫芦岛市": [
    120.860758,
    40.74303
  ],
  "吉林市": [
    126.564544,
    43.871988
  ],
  "长春市": [
    125.313642,
    43.898338
  ],
  "四平市": [
    124.391382,
    43.175525
  ],
  "辽源市": [
    125.133686,
    42.923303
  ],
  "通化市": [
    125.94265,
    41.736397
  ],
  "铁岭市": [
    123.85485,
    42.299757
  ],
  "延边朝鲜族自治州": [
    129.485902,
    42.896414
  ],
  "白城市": [
    122.840777,
    45.621086
  ],
  "松原市": [
    124.832995,
    45.136049
  ],
  "鹤岗市": [
    130.292472,
    47.338666
  ],
  "鸡西市": [
    130.941767,
    45.32154
  ],
  "白山市": [
    126.435798,
    41.945859
  ],
  "哈尔滨市": [
    126.657717,
    45.773225
  ],
  "齐齐哈尔市": [
    123.987289,
    47.3477
  ],
  "双鸭山市": [
    131.171402,
    46.655102
  ],
  "大庆市": [
    125.02184,
    46.596709
  ],
  "七台河市": [
    131.019048,
    45.775005
  ],
  "佳木斯市": [
    130.284735,
    46.81378
  ],
  "黑河市": [
    127.50083,
    50.25069
  ],
  "大兴安岭地区": [
    124.196104,
    51.991789
  ],
  "牡丹江市": [
    129.608035,
    44.588521
  ],
  "绥化市": [
    126.989095,
    46.646064
  ],
  "上海市": [121.472644,31.231706],
  "无锡市": [
    120.305456,
    31.570037
  ],
  "徐州市": [
    117.188107,
    34.271553
  ],
  "常州市": [
    119.981861,
    31.771397
  ],
  "苏州市": [
    120.619907,
    31.317987
  ],
  "连云港市": [
    119.173872,
    34.601549
  ],
  "南京市": [
    118.778074,
    32.057236
  ],
  "南通市": [
    120.873801,
    32.014665
  ],
  "盐城市": [
    120.148872,
    33.379862
  ],
  "泰州市": [
    119.919606,
    32.476053
  ],
  "镇江市": [
    119.455835,
    32.204409
  ],
  "宿迁市": [
    118.296893,
    33.95205
  ],
  "杭州市": [
    120.219375,
    30.259244
  ],
  "宁波市": [
    121.579006,
    29.885259
  ],
  "扬州市": [
    119.427778,
    32.408505
  ],
  "温州市": [
    120.690635,
    28.002838
  ],
  "湖州市": [
    120.137243,
    30.877925
  ],
  "绍兴市": [
    120.592467,
    30.002365
  ],
  "嘉兴市": [
    120.760428,
    30.773992
  ],
  "衢州市": [
    118.875842,
    28.95691
  ],
  "舟山市": [
    122.169872,
    30.03601
  ],
  "金华市": [
    119.652576,
    29.102899
  ],
  "台州市": [
    121.440613,
    28.668283
  ],
  "合肥市": [
    117.282699,
    31.866942
  ],
  "丽水市": [
    119.929576,
    28.4563
  ],
  "蚌埠市": [
    117.35708,
    32.929499
  ],
  "淮南市": [
    117.018639,
    32.642812
  ],
  "芜湖市": [
    118.384108,
    31.36602
  ],
  "马鞍山市": [
    118.515882,
    31.688528
  ],
  "淮北市": [
    116.791447,
    33.960023
  ],
  "铜陵市": [
    117.819429,
    30.94093
  ],
  "安庆市": [
    117.058739,
    30.537898
  ],
  "滁州市": [
    118.32457,
    32.317351
  ],
  "阜阳市": [
    115.820932,
    32.901211
  ],
  "六安市": [
    116.505253,
    31.755558
  ],
  "宿州市": [
    116.988692,
    33.636772
  ],
  "亳州市": [
    115.787928,
    33.871211
  ],
  "宣城市": [
    118.752096,
    30.951642
  ],
  "福州市": [
    119.330221,
    26.047125
  ],
  "池州市": [
    117.494477,
    30.660019
  ],
  "厦门市": [
    118.103886,
    24.489231
  ],
  "三明市": [
    117.642194,
    26.270835
  ],
  "莆田市": [
    119.077731,
    25.44845
  ],
  "漳州市": [
    117.676205,
    24.517065
  ],
  "南平市": [
    118.181883,
    26.643626
  ],
  "龙岩市": [
    117.017997,
    25.078685
  ],
  "宁德市": [
    119.542082,
    26.656527
  ],
  "南昌市": [
    115.893528,
    28.689578
  ],
  "景德镇市": [
    117.186523,
    29.303563
  ],
  "泉州市": [
    118.600362,
    24.901652
  ],
  "萍乡市": [
    113.859917,
    27.639544
  ],
  "新余市": [
    114.947117,
    27.822322
  ],
  "九江市": [
    115.999848,
    29.71964
  ],
  "鹰潭市": [
    117.03545,
    28.24131
  ],
  "吉安市": [
    114.992039,
    27.113848
  ],
  "赣州市": [
    114.935909,
    25.845296
  ],
  "宜春市": [
    114.400039,
    27.81113
  ],
  "青岛市": [
    120.384428,
    36.105215
  ],
  "上饶市": [
    117.955464,
    28.457623
  ],
  "济南市": [
    117.024967,
    36.682785
  ],
  "抚州市": [
    116.360919,
    27.954545
  ],
  "枣庄市": [
    117.279305,
    34.807883
  ],
  "淄博市": [
    118.059134,
    36.804685
  ],
  "烟台市": [
    121.309555,
    37.536562
  ],
  "济宁市": [
    116.600798,
    35.402122
  ],
  "潍坊市": [
    119.142634,
    36.716115
  ],
  "日照市": [
    119.50718,
    35.420225
  ],
  "威海市": [
    122.093958,
    37.528787
  ],
  "泰安市": [
    117.089415,
    36.188078
  ],
  "德州市": [
    116.328161,
    37.460826
  ],
  "莱芜市": [
    117.684667,
    36.233654
  ],
  "临沂市": [
    118.340768,
    35.072409
  ],
  "菏泽市": [
    115.46336,
    35.26244
  ],
  "聊城市": [
    115.986869,
    36.455829
  ],
  "滨州市": [
    117.968292,
    37.405314
  ],
  "开封市": [
    114.351642,
    34.801854
  ],
  "洛阳市": [
    112.447525,
    34.657368
  ],
  "郑州市": [
    113.649644,
    34.75661
  ],
  "平顶山市": [
    113.300849,
    33.745301
  ],
  "安阳市": [
    114.351807,
    36.110267
  ],
  "濮阳市": [
    115.026627,
    35.753298
  ],
  "焦作市": [
    113.211836,
    35.234608
  ],
  "鹤壁市": [
    114.29777,
    35.755426
  ],
  "新乡市": [
    113.91269,
    35.307258
  ],
  "许昌市": [
    113.835312,
    34.02674
  ],
  "漯河市": [
    114.046061,
    33.576279
  ],
  "三门峡市": [
    111.181262,
    34.78332
  ],
  "南阳市": [
    112.542842,
    33.01142
  ],
  "商丘市": [
    115.641886,
    34.438589
  ],
  "信阳市": [
    114.085491,
    32.128582
  ],
  "周口市": [
    114.654102,
    33.623741
  ],
  "驻马店市": [
    114.049154,
    32.983158
  ],
  "武汉市": [
    114.3162,
    30.581084
  ],
  "十堰市": [
    110.801229,
    32.636994
  ],
  "宜昌市": [
    111.310981,
    30.732758
  ],
  "黄石市": [
    115.050683,
    30.216127
  ],
  "荆门市": [
    112.21733,
    31.042611
  ],
  "鄂州市": [
    114.895594,
    30.384439
  ],
  "孝感市": [
    113.935734,
    30.927955
  ],
  "咸宁市": [
    114.300061,
    29.880657
  ],
  "黄冈市": [
    114.906618,
    30.446109
  ],
  "随州市": [
    113.379358,
    31.717858
  ],
  "恩施土家族苗族自治州": [
    109.491923,
    30.285888
  ],
  "长沙市": [
    112.979353,
    28.213478
  ],
  "湘潭市": [
    112.935556,
    27.835095
  ],
  "邵阳市": [
    111.461525,
    27.236811
  ],
  "衡阳市": [
    112.583819,
    26.898164
  ],
  "岳阳市": [
    113.146196,
    29.378007
  ],
  "常德市": [
    111.653718,
    29.012149
  ],
  "张家界市": [
    110.48162,
    29.124889
  ],
  "益阳市": [
    112.366547,
    28.588088
  ],
  "株洲市": [
    113.131695,
    27.827433
  ],
  "郴州市": [
    113.037704,
    25.782264
  ],
  "永州市": [
    111.614648,
    26.435972
  ],
  "怀化市": [
    109.986959,
    27.557483
  ],
  "湘西土家族苗族自治州": [
    109.745746,
    28.317951
  ],
  "娄底市": [
    111.996396,
    27.741073
  ],
  "广州市": [
    113.30765,
    23.120049
  ],
  "深圳市": [
    114.025974,
    22.546054
  ],
  "珠海市": [
    113.562447,
    22.256915
  ],
  "韶关市": [
    113.594461,
    24.80296
  ],
  "佛山市": [
    113.134026,
    23.035095
  ],
  "汕头市": [
    116.72865,
    23.383908
  ],
  "肇庆市": [
    112.479653,
    23.078663
  ],
  "江门市": [
    113.078125,
    22.575117
  ],
  "茂名市": [
    110.931245,
    21.668226
  ],
  "湛江市": [
    110.365067,
    21.257463
  ],
  "梅州市": [
    116.126403,
    24.304571
  ],
  "河源市": [
    114.713721,
    23.757251
  ],
  "清远市": [
    113.040773,
    23.698469
  ],
  "阳江市": [
    111.97701,
    21.871517
  ],
  "汕尾市": [
    115.372924,
    22.778731
  ],
  "惠州市": [
    114.410658,
    23.11354
  ],
  "东莞市": [
    113.763434,
    23.043024
  ],
  "潮州市": [
    116.630076,
    23.661812
  ],
  "云浮市": [
    112.050946,
    22.937976
  ],
  "南宁市": [
    108.297234,
    22.806493
  ],
  "揭阳市": [
    116.379501,
    23.547999
  ],
  "柳州市": [
    109.422402,
    24.329053
  ],
  "桂林市": [
    110.26092,
    25.262901
  ],
  "防城港市": [
    108.351791,
    21.617398
  ],
  "梧州市": [
    111.305472,
    23.485395
  ],
  "北海市": [
    109.122628,
    21.472718
  ],
  "玉林市": [
    110.151676,
    22.643974
  ],
  "钦州市": [
    108.638798,
    21.97335
  ],
  "百色市": [
    106.631821,
    23.901512
  ],
  "贺州市": [
    111.552594,
    24.411054
  ],
  "贵港市": [
    109.613708,
    23.103373
  ],
  "崇左市": [
    107.357322,
    22.415455
  ],
  "河池市": [
    108.069948,
    24.699521
  ],
  "来宾市": [
    109.231817,
    23.741166
  ],
  "海口市": [
    110.330802,
    20.022071
  ],
  "三亚市": [
    109.522771,
    18.257776
  ],
  "重庆市": [
    106.530635,
    29.544606
  ],
  "成都市": [
    104.067923,
    30.679943
  ],
  "攀枝花市": [
    101.722423,
    26.587571
  ],
  "自贡市": [
    104.776071,
    29.359157
  ],
  "泸州市": [
    105.44397,
    28.89593
  ],
  "德阳市": [
    104.402398,
    31.13114
  ],
  "绵阳市": [
    104.705519,
    31.504701
  ],
  "广元市": [
    105.819687,
    32.44104
  ],
  "乐山市": [
    103.760824,
    29.600958
  ],
  "南充市": [
    106.105554,
    30.800965
  ],
  "眉山市": [
    103.84143,
    30.061115
  ],
  "宜宾市": [
    104.633019,
    28.769675
  ],
  "雅安市": [
    103.009356,
    29.999716
  ],
  "达州市": [
    107.494973,
    31.214199
  ],
  "巴中市": [
    106.757916,
    31.869189
  ],
  "内江市": [
    105.073056,
    29.599462
  ],
  "甘孜藏族自治州": [
    101.969232,
    30.055144
  ],
  "凉山彝族自治州": [
    102.259591,
    27.892393
  ],
  "阿坝藏族羌族自治州": [
    102.228565,
    31.905763
  ],
  "贵阳市": [
    106.709177,
    26.629907
  ],
  "遂宁市": [
    105.564888,
    30.557491
  ],
  "遵义市": [
    106.93126,
    27.699961
  ],
  "安顺市": [
    105.92827,
    26.228595
  ],
  "六盘水市": [
    104.852087,
    26.591866
  ],
  "黔西南布依族苗族自治州": [
    104.900558,
    25.095148
  ],
  "昆明市": [
    102.714601,
    25.049153
  ],
  "黔东南苗族侗族自治州": [
    107.985353,
    26.583992
  ],
  "黔南布依族苗族自治州": [
    107.523205,
    26.264536
  ],
  "玉溪市": [
    102.545068,
    24.370447
  ],
  "保山市": [
    99.177996,
    25.120489
  ],
  "昭通市": [
    103.725021,
    27.340633
  ],
  "丽江市": [
    100.229628,
    26.875351
  ],
  "曲靖市": [
    103.782539,
    25.520758
  ],
  "普洱市": [
    100.980058,
    22.788778
  ],
  "临沧市": [
    100.092613,
    23.887806
  ],
  "楚雄彝族自治州": [
    101.529382,
    25.066356
  ],
  "西双版纳傣族自治州": [
    100.803038,
    22.009433
  ],
  "大理白族自治州": [
    100.223675,
    25.5969
  ],
  "红河哈尼族彝族自治州": [
    103.384065,
    23.367718
  ],
  "德宏傣族景颇族自治州": [
    98.589434,
    24.44124
  ],
  "怒江傈僳族自治州": [
    98.859932,
    25.860677
  ],
  "迪庆藏族自治州": [
    99.713682,
    27.831029
  ],
  "拉萨市": [
    91.111891,
    29.662557
  ],
  "文山壮族苗族自治州": [
    104.246294,
    23.374087
  ],
  "日喀则市": [
    88.956063,
    29.26816
  ],
  "那曲地区": [
    92.067018,
    31.48068
  ],
  "阿里地区": [
    81.107669,
    30.404557
  ],
  "铜川市": [
    108.968067,
    34.908368
  ],
  "宝鸡市": [
    107.170645,
    34.364081
  ],
  "咸阳市": [
    108.707509,
    34.345373
  ],
  "延安市": [
    109.50051,
    36.60332
  ],
  "汉中市": [
    107.045478,
    33.081569
  ],
  "安康市": [
    109.038045,
    32.70437
  ],
  "商洛市": [
    109.934208,
    33.873907
  ],
  "兰州市": [
    103.823305,
    36.064226
  ],
  "榆林市": [
    109.745926,
    38.279439
  ],
  "嘉峪关市": [
    98.281635,
    39.802397
  ],
  "渭南市": [
    109.483933,
    34.502358
  ],
  "金昌市": [
    102.208126,
    38.516072
  ],
  "天水市": [
    105.736932,
    34.584319
  ],
  "张掖市": [
    100.459892,
    38.93932
  ],
  "武威市": [
    102.640147,
    37.933172
  ],
  "平凉市": [
    106.688911,
    35.55011
  ],
  "酒泉市": [
    98.508415,
    39.741474
  ],
  "庆阳市": [
    107.644227,
    35.726801
  ],
  "定西市": [
    104.626638,
    35.586056
  ],
  "陇南市": [
    104.934573,
    33.39448
  ],
  "临夏回族自治州": [
    103.215249,
    35.598514
  ],
  "西宁市": [
    101.767921,
    36.640739
  ],
  "甘南藏族自治州": [
    102.917442,
    34.992211
  ],
  "海北藏族自治州": [
    100.879802,
    36.960654
  ],
  "黄南藏族自治州": [
    102.0076,
    35.522852
  ],
  "海南藏族自治州": [
    100.624066,
    36.284364
  ],
  "海西蒙古族藏族自治州": [
    97.342625,
    37.373799
  ],
  "玉树藏族自治州": [
    97.013316,
    33.00624
  ],
  "石嘴山市": [
    106.379337,
    39.020223
  ],
  "银川市": [
    106.206479,
    38.502621
  ],
  "吴忠市": [
    106.208254,
    37.993561
  ],
  "果洛藏族自治州": [
    100.223723,
    34.480485
  ],
  "固原市": [
    106.285268,
    36.021523
  ],
  "中卫市": [
    105.196754,
    37.521124
  ],
  "乌鲁木齐市": [
    87.564988,
    43.84038
  ],
  "克拉玛依市": [
    84.92699,
    45.203919
  ],
  "吐鲁番市": [
    89.266025,
    42.678925
  ],
  "昌吉回族自治州": [
    87.296038,
    44.007058
  ],
  "巴音郭楞蒙古自治州": [
    86.121688,
    41.771362
  ],
  "阿克苏地区": [
    80.269846,
    41.171731
  ],
  "博尔塔拉蒙古自治州": [
    82.052436,
    44.913651
  ],
  "克孜勒苏柯尔克孜自治州": [
    76.137564,
    39.750346
  ],
  "喀什地区": [
    75.992973,
    39.470627
  ],
  "和田地区": [
    79.930239,
    37.116774
  ],
  "塔城地区": [
    82.974881,
    46.758684
  ],
  "阿勒泰地区": [
    88.137915,
    47.839744
  ],
  "伊犁哈萨克自治州": [
    81.297854,
    43.922248
  ],
  "台北市": [
    121.509062,
    25.044332
  ],
  "香港": [
    114.173355,
    22.320048
  ],
  "澳门": [
    113.54909,
    22.198951
  ],
  "承德市": [
    117.9566684804,
    40.9499365609
  ],
  "大同市": [
    113.2929418393,
    40.0752143772
  ],
  "伊春市": [
    128.8339790167,
    47.7251079024
  ],
  "淮安市": [
    119.0095511085,
    33.6115909198
  ],
  "黄山市": [
    118.1594541135,
    30.1356984953
  ],
  "东营市": [
    118.5764218401,
    37.4481702626
  ],
  "襄阳市": [
    112.1158913347,
    32.0110017292
  ],
  "荆州市": [
    112.2332542605,
    30.337644333
  ],
  "中山市": [
    113.3875150108,
    22.5186702576
  ],
  "三沙市": [
    112.344018,
    16.838949
  ],
  "儋州市": [
    109.5769823445,
    19.5230176367
  ],
  "广安市": [
    106.6292128826,
    30.4587650669
  ],
  "资阳市": [
    104.6255914686,
    30.1316128807
  ],
  "毕节市": [
    105.2887629034,
    27.2878699566
  ],
  "铜仁市": [
    109.1854181189,
    27.7347351333
  ],
  "昌都市": [
    97.1725441521,
    31.1436520016
  ],
  "林芝市": [
    94.3603294243,
    29.6508813004
  ],
  "山南市": [
    91.770978663,
    29.240086764
  ],
  "西安市": [
    108.9353552803,
    34.3425803471
  ],
  "白银市": [
    104.1351288426,
    36.5446736927
  ],
  "海东市": [
    102.1019117413,
    36.5022545795
  ],
  "哈密市": [
    93.5130917055,
    42.8183221254
  ],
  "台湾": [121.509062,24.044332],
  "河北": [
    115.661434,
    38.61384
  ],
  "山西": [
    112.515496,
    37.866566
  ],
  "内蒙古": [
    114.415868,
    43.468238
  ],
  "辽宁": [
    122.753592,
    41.6216
  ],
  "黑龙江": [
    128.047414,
    47.356592
  ],
  "江苏": [
    119.368489,
    33.013797
  ],
  "浙江": [
    119.957202,
    29.159494
  ],
  "安徽": [
    117.216005,
    31.859252
  ],
  "江西": [
    115.676082,
    27.757258
  ],
  "福建": [
    117.984943,
    26.050118
  ],
  "山东": [
    118.527663,
    36.09929
  ],
  "湖北": [
    112.410562,
    31.209316
  ],
  "湖南": [
    111.720664,
    27.695864
  ],
  "广东": [
    113.394818,
    23.408004
  ],
  "广西": [
    108.924274,
    23.552255
  ],
  "四川": [
    102.89916,
    30.367481
  ],
  "贵州": [
    106.734996,
    26.902826
  ],
  "云南": [
    101.592952,
    24.864213
  ],
  "甘肃": [
    102.457625,
    38.103267
  ],
  "青海": [
    96.202544,
    35.499761
  ],
  "宁夏": [
    106.155481,
    37.321323
  ],
  "陕西": [
    109.503789,
    35.860026
  ],
  "西藏": [
    89.137982,
    31.367315
  ]
};

//计算天数差的函数，通用
    function DateDiff(sDate1, sDate2){  //sDate1和sDate2是2002/12/18格式
        var aDate, oDate1, oDate2, iDays;
        aDate = sDate1.split("/");
        oDate1 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0]);  //转换为12-18-2002格式
        aDate = sDate2.split("/");
        oDate2 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0]);
        iDays = parseInt(Math.abs(oDate1 - oDate2) / 1000 / 60 / 60 /24);  //把相差的毫秒数转换为天数
        return iDays;

}
Date.prototype.format = function(fmt){
  var o = {
    "M+" : this.getMonth()+1,                 //月份
    "d+" : this.getDate(),                    //日
    "h+" : this.getHours(),                   //小时
    "m+" : this.getMinutes(),                 //分
    "s+" : this.getSeconds(),                 //秒
    "q+" : Math.floor((this.getMonth()+3)/3), //季度
    "S"  : this.getMilliseconds()             //毫秒
  };

  if(/(y+)/.test(fmt)){
    fmt=fmt.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length));
  }
        
  for(var k in o){
    if(new RegExp("("+ k +")").test(fmt)){
      fmt = fmt.replace(
        RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));  
    }       
  }

  return fmt;
}
  var convertDatas = function (datas,dates) {
    var dataDate=datas[dates];
      var res = [];
      for (var i = 0; i < dataDate.length; i++) {
          var cname=dataDate[i]["cname"];
          var geoCoord = geoCoordMap[cname];
          if (geoCoord) {
              //console.log(datas[i],dates);
              
                res.push({
                    name: cname,
                    value: geoCoord.concat(dataDate[i]["confirmCount"])
                });
                  
              }                  

      }
      
      //console.log(res);
      return res;
  }; 


        
        var dataList=[];
        var dataList2=[];
        
        
        
        dates = Object.keys(DATAS)
        var today = new Date().format("yyyy/MM/dd");
        var n=dates.length;
        var lastDate = dates[n-1];
        //ts 相减的差值
        var ts = DateDiff(lastDate, "2020/01/17");
        console.log(ts)

        for(var i=0; i<=ts; i++){
            var d0 = new Date(2020,0,17)
            //console.log(d0.format("yyyy/MM/dd"))
            //var myDate=new Date();
            d0.setDate(d0.getDate()+i);
            dataList.push(d0.format("yyyy/M/d"));
            dataList2.push(d0.format('yyyy-MM-dd'));
  
        }
        console.log(dataList)

        var dom = document.getElementById("container");
        var myChart = echarts.init(dom);
        var app = {};

        var option = {
            timeline:{
                        data: dataList2,
                        label : {                            
                            formatter :  function (value, index) {
                                // 格式化成月/日，只在第一个刻度显示年份
                                var date = new Date(value);
                                var texts = [(date.getMonth() + 1), date.getDate()];
                                if (index === 0) {
                                    //texts.unshift(date.getYear());
                                }
                                return texts.join('/');
                            },
                            color : '#fffff4'

                        },
                        autoPlay : true,
                        playInterval : 2000
                    },
            options :[
            {
                title: {
                    text: '全国地级市新冠肺炎疫情热力图'+ '（' + LAST_UPDATE + '）',
                    subtext: '返回全球疫情图',
                    sublink: 'index.html',
                    left: 'center',
                    textStyle: {
                        color: '#fff'
                    }
                },
                tooltip: {
                    trigger: 'item',
                    formatter: function (params) {
                        return '确诊 '+params.value[2] + ' 例 ';
                    }

                },
                backgroundColor: '#404a59',
                
                visualMap: {
                    min: 0,
                    max: 25000,
                    type: 'piecewise',
                    pieces: [
                        {gt: 5000},            // (1000, Infinity]            
                        {gt: 1000, lte: 5000},  // (310, 1000]
                        {gt: 100, lte: 1000},   // (200, 300]
                        {gt: 10, lte: 100},       // (10, 200]
                        {ge: 1,lt: 10},                 // (-Infinity, 5)
                        {lte: 0}
                    ],
                    inRange: {
                        color: ['#cf0000','#ff4e5d','#eac736','#ece25c','#ffffff'].reverse()
                    },
                    textStyle: {
                        color: '#fff'
                    }
                },
                toolbox: {
                    show: true,
                    orient: 'vertical',
                    left: 'right',
                    top: 'center',
                    feature: {
                        mark: {show: true},
                        dataView: {show: true, readOnly: false},
                        restore: {show: true},
                        saveAsImage: {show: true}
                    }
                },
                geo: {
                    map: 'china',
                    label: {
                        emphasis: {
                            show: false
                        }
                    },
                    roam: true,
                    itemStyle: {
                        normal: {
                            areaColor: '#323c48',
                            borderColor: '#111'
                        },
                        emphasis: {
                            areaColor: '#2a333d'
                        }
                    }
                },
                series: [{
                    name: '2019-nCoV',
                    type: 'scatter',
                    pointSize: 4, // 设置 热力图 点 的大小
                    blurSize: 1, // 设置点的 阴影半径
                    coordinateSystem: 'geo',
                    label: {
                            formatter: '{b}',
                            position: 'right',
                            show: false,
                            color: 'rgb(249, 249, 249)'
                        },
                    emphasis: {
                        label: {
                            show: true
                        }
                    },
                    
                    data: convertDatas(DATAS,dataList[0])
                }]
            }
            ]
        };
        
        for (var i = 1; i < dataList2.length; i++) {
            option.options.push({
                title: {
                    text: '全国地级市新冠肺炎疫情' + dataList2[i] + '时空图',
                },
                series: [{
                        name: '2019-nCoV '+ dataList2[i],
                        type: 'scatter',
                        pointSize: 4, // 设置 热力图 点 的大小
                        blurSize: 1, // 设置点的 阴影半径
                        coordinateSystem: 'geo',
                        label: {
                                formatter: '{b}',
                                position: 'right',
                                show: false,
                                color: 'rgb(249, 249, 249)'
                            },
                        emphasis: {
                            label: {
                                show: true
                            }
                        },
                        data: convertDatas(DATAS,dataList[i])
                    }
                ]
            });
        }

        if (option && typeof option === "object") {
            myChart.setOption(option, true);
        }
    
 
       </script>
   </body>
</html>
